home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / hypercar / xcmd / hfind.sit / HyperFind 1.0 / stack_-1.xml < prev    next >
Encoding:
Extensible Markup Language  |  1991-07-14  |  4.1 KB  |  20 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in.0</name>
  5.     <id>-1</id>
  6.     <cardCount>1</cardCount>
  7.     <cardID>3030</cardID>
  8.     <listID>4194</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>512</width>
  14.         <height>342</height>
  15.     </cardSize>
  16.     <script>-- HyperFind 1.0├ƒ7
  17. -- Copyright ┬⌐ 1991 by Kevin Altis
  18. --
  19. -- Kevin Altis
  20. -- KEA
  21. -- 1631 SW Yamhill, Suite 209
  22. -- Portland, OR 97205
  23. -- (503) 223-1149
  24. --
  25. -- America Online: KAltis
  26. -- AppleLink: D4213
  27. -- Compuserve: 73137,434
  28.  
  29.  
  30. -- gHyperFind stores various parameters of HyperFind as separate lines
  31. -- 1. find method: default (none), chars, string, whole, or word
  32. -- 2. search text
  33. -- 3. field # to restrict find to or 0 for all cd and bg fields
  34. -- 4. restrict find to marked cds only (true or false)
  35. -- 5. x,y location of HyperFind window in coordinates global to the
  36. --    topmost card window
  37. -- 6. whether to zoom window (true or false)
  38. on doMenu iName, mName
  39. global gHyperFind
  40.  
  41. if iName = "Find..." then
  42. if there is a window "Find"
  43. then show window "Find" -- set "select" of window "Find" to "" -- show and bring to front (param value is irrelevant)
  44. else
  45. if gHyperFind is empty then initgHyperFind  -- restore gHyperFind
  46. if selectedChunk() is not empty
  47. then put line 1 of selectedText() into line 2 of gHyperFind
  48. if line 6 of gHyperFind = true then
  49. HyperFind line 1 of gHyperFind, line 2 of gHyperFind, ┬¼
  50. line 3 of gHyperFind, line 4 of gHyperFind, line 5 of gHyperFind, true
  51. else
  52. HyperFind line 1 of gHyperFind, line 2 of gHyperFind, ┬¼
  53. 0, false, line 5 of gHyperFind, false
  54. end if
  55. end if
  56. set editBkgnd to false  -- make sure we can see text in fields
  57. choose browse tool -- force closeField
  58. else pass doMenu
  59. end doMenu
  60.  
  61. -- when a CloseXWindow message is sent to HyperFind
  62. -- it will send a closeHyperFind message before closing HyperFind
  63. -- so we have a chance to save the current parameters of HyperFind
  64. -- for the next time its called
  65. -- the parameters will probably be sent with the message to save the
  66. -- hassle of having to do "get property..." for each parameter
  67. on closeHyperFind method, pattern, findField, markedOnly, windowLoc, zoomed
  68. global gHyperFind
  69.  
  70. -- put the params into gHyperFind
  71. if findField = "All Card & Background Fields"
  72. then get 0
  73. else
  74. if char 1 to 15 of findField = "bkgnd field id "
  75. then get fld id (word 4 of findField)
  76. else get number of fld findField
  77. end if
  78. put method & return & pattern & return & it & return & ┬¼
  79. markedOnly & return & windowLoc & return & zoomed into gHyperFind
  80. end closeHyperFind
  81.  
  82. on helpHyperFind
  83. get short name of me
  84. if short name of this stack is not it then
  85. push cd
  86. -- lock screen
  87. go stack it
  88. -- unlock screen with visual effect iris open
  89. end if
  90. end helpHyperFind
  91.  
  92. -- restore gHyperFind from last time we were using HyperCard
  93. on initgHyperFind
  94. global gHyperFind
  95.  
  96. lock screen
  97. set lockMessages to true
  98. set lockRecent to true
  99. push cd
  100. -- We won't restore gHyperFind if the user is asked to find this stack
  101. -- but chooses "Cancel" from the SFGetDialog, or if this stack has
  102. -- been modified so there is no longer a "gHyperFind Clipboard" field.
  103. get short name of me
  104. if short name of this stack is not it then go stack it
  105. put cd fld "gHyperFind Clipboard" into gHyperFind
  106. pop cd
  107. set lockMessages to false
  108. set lockRecent to false
  109. unlock screen
  110. end initgHyperFind
  111.  
  112. -- save gHyperFind for next time we use HyperCard
  113. on savegHyperFind
  114. global gHyperFind
  115.  
  116. lock screen
  117. set lockMessages to true
  118. push cd
  119. -- We won't save gHyperFind if the user is asked to find this stack
  120. -- but chooses "Cancel" from the SFGetDialog, or if this stack has
  121. -- been modified so there is no longer a "gHyperFind Clipboard" field.
  122. get short name of me
  123. if short name of this stack is not it then go stack it
  124. put gHyperFind into cd fld "gHyperFind Clipboard"
  125. pop cd
  126. set lockMessages to false
  127. unlock screen
  128. end savegHyperFind
  129.  
  130. on quit
  131. savegHyperFind
  132. end quit</script>
  133.     <background id="2615" file="background_2615.xml" name="" />
  134.     <card id="3030" file="card_3030.xml" marked="false" name="" owner="2615" />
  135. </stack>
  136.